package cm.studapp.actIndo;

import cm.studapp.R;
import cm.studapp.R.layout;
import cm.studapp.database.DbManager;
import cm.studapp.helpers.ButtonHelper;
import cm.studapp.helpers.TimeHelper;
import android.app.Activity;
import android.database.Cursor;
import android.os.Bundle;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.EditText;
import android.widget.TextView;
import android.widget.TimePicker;

public class ActRepTests extends Activity {

	private Button addButton;
	private ButtonHelper bHelper;
	private DbManager db;
	Cursor signatureData;
	int idAct;
	long fecha1;
	long fecha2;
	public ActRepTests() {
		// TODO Auto-generated constructor stub
	}
	
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.rep_act_homeworks);
		idAct=getIntent().getExtras().getInt("idAct");
		init();
		initComponents();
		initViews();
	}
	
	private void initViews() {
		// TODO Auto-generated method stub
		/*
		DatePicker dpSd=(DatePicker)findViewById(R.id.ApptAddDP_startDate);
		TimePicker tpst=(TimePicker)findViewById(R.id.ApptAddTP_startTime);
		TimePicker tpft=(TimePicker)findViewById(R.id.ApptAddTP_endTime);
		//EditText name=(EditText)findViewById(R.id.ApptAddET_hwkName);
		/*fecha1=TimeHelper.fullDateToMillis(dpSd, tpst);
		fecha2=TimeHelper.fullDateToMillis(dpSd, tpft);*/
		
	
		
	}

	public void init(){
		bHelper = new ButtonHelper(this);
		addButton = (Button)findViewById(R.id.RepActHomeWoBTN_addHomework);
		addButton.setOnClickListener(bHelper);
		
		TextView nombreTipo=(TextView)findViewById(R.id.RepActHomeWoTW_actType);
		nombreTipo.setText("Horarios de tareas" );
		
		TextView nombreAct = (TextView)findViewById(R.id.RepActHomeWoTW_actName);
		nombreAct.setText(db.getActName(idAct));
		
	}
	
	public void initComponents(){
		db=new DbManager(this);
		signatureData=db.getRepActData(idAct);
		
	}

}